<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MQTT C Client Libraries Internals: MQTTAsync_message Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="pahologo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MQTT C Client Libraries Internals
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-attribs">Data Fields</a>  </div>
  <div class="headertitle">
<div class="title">MQTTAsync_message Struct Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>A structure representing the payload and attributes of an MQTT message.  
 <a href="structMQTTAsync__message.html#details">More...</a></p>

<p><code>#include &lt;MQTTAsync.h&gt;</code></p>
<div class="dynheader">
Collaboration diagram for MQTTAsync_message:</div>
<div class="dyncontent">
<div class="center"><img src="structMQTTAsync__message__coll__graph.png" border="0" usemap="#MQTTAsync__message_coll__map" alt="Collaboration graph"/></div>
<map name="MQTTAsync__message_coll__map" id="MQTTAsync__message_coll__map">
<area shape="rect" title="A structure representing the payload and attributes of an MQTT message." alt="" coords="5,288,160,315"/>
<area shape="rect" href="structMQTTProperties.html" title="MQTT version 5 property list." alt="" coords="23,199,142,225"/>
<area shape="rect" href="structMQTTProperty.html" title="Structure to hold an MQTT version 5 property of any type." alt="" coords="29,109,136,136"/>
<area shape="rect" href="structMQTTLenString.html" title="The data for a length delimited string." alt="" coords="25,5,140,32"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Data Fields</h2></td></tr>
<tr class="memitem:a4621b522c9923c68003d30e9dba9aa4e"><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTAsync__message.html#a4621b522c9923c68003d30e9dba9aa4e">struct_id</a> [4]</td></tr>
<tr class="memdesc:a4621b522c9923c68003d30e9dba9aa4e"><td class="mdescLeft">&#160;</td><td class="mdescRight">The eyecatcher for this structure.  <a href="structMQTTAsync__message.html#a4621b522c9923c68003d30e9dba9aa4e">More...</a><br /></td></tr>
<tr class="separator:a4621b522c9923c68003d30e9dba9aa4e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af79efdfc9a4e082cbbafaed8fd333ce1"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTAsync__message.html#af79efdfc9a4e082cbbafaed8fd333ce1">struct_version</a></td></tr>
<tr class="memdesc:af79efdfc9a4e082cbbafaed8fd333ce1"><td class="mdescLeft">&#160;</td><td class="mdescRight">The version number of this structure.  <a href="structMQTTAsync__message.html#af79efdfc9a4e082cbbafaed8fd333ce1">More...</a><br /></td></tr>
<tr class="separator:af79efdfc9a4e082cbbafaed8fd333ce1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9271900e2789ff81e382a47842aaee8f"><td class="memItemLeft" align="right" valign="top"><a id="a9271900e2789ff81e382a47842aaee8f"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTAsync__message.html#a9271900e2789ff81e382a47842aaee8f">payloadlen</a></td></tr>
<tr class="memdesc:a9271900e2789ff81e382a47842aaee8f"><td class="mdescLeft">&#160;</td><td class="mdescRight">The length of the MQTT message payload in bytes. <br /></td></tr>
<tr class="separator:a9271900e2789ff81e382a47842aaee8f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a13d88e9c871b5b39b73370a0784331af"><td class="memItemLeft" align="right" valign="top"><a id="a13d88e9c871b5b39b73370a0784331af"></a>
void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTAsync__message.html#a13d88e9c871b5b39b73370a0784331af">payload</a></td></tr>
<tr class="memdesc:a13d88e9c871b5b39b73370a0784331af"><td class="mdescLeft">&#160;</td><td class="mdescRight">A pointer to the payload of the MQTT message. <br /></td></tr>
<tr class="separator:a13d88e9c871b5b39b73370a0784331af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e0971dbde0f04b6dd3bfab97ad5cdb7"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTAsync__message.html#a6e0971dbde0f04b6dd3bfab97ad5cdb7">qos</a></td></tr>
<tr class="memdesc:a6e0971dbde0f04b6dd3bfab97ad5cdb7"><td class="mdescLeft">&#160;</td><td class="mdescRight">The quality of service (QoS) assigned to the message.  <a href="structMQTTAsync__message.html#a6e0971dbde0f04b6dd3bfab97ad5cdb7">More...</a><br /></td></tr>
<tr class="separator:a6e0971dbde0f04b6dd3bfab97ad5cdb7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a680f5368d5a13ff605466ab6a3d881bd"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTAsync__message.html#a680f5368d5a13ff605466ab6a3d881bd">retained</a></td></tr>
<tr class="memdesc:a680f5368d5a13ff605466ab6a3d881bd"><td class="mdescLeft">&#160;</td><td class="mdescRight">The retained flag serves two purposes depending on whether the message it is associated with is being published or received.  <a href="structMQTTAsync__message.html#a680f5368d5a13ff605466ab6a3d881bd">More...</a><br /></td></tr>
<tr class="separator:a680f5368d5a13ff605466ab6a3d881bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa9da73253863089ee90033c7f0dd28bf"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTAsync__message.html#aa9da73253863089ee90033c7f0dd28bf">dup</a></td></tr>
<tr class="memdesc:aa9da73253863089ee90033c7f0dd28bf"><td class="mdescLeft">&#160;</td><td class="mdescRight">The dup flag indicates whether or not this message is a duplicate.  <a href="structMQTTAsync__message.html#aa9da73253863089ee90033c7f0dd28bf">More...</a><br /></td></tr>
<tr class="separator:aa9da73253863089ee90033c7f0dd28bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c8572ec595842768848982321835bfe"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTAsync__message.html#a2c8572ec595842768848982321835bfe">msgid</a></td></tr>
<tr class="memdesc:a2c8572ec595842768848982321835bfe"><td class="mdescLeft">&#160;</td><td class="mdescRight">The message identifier is reserved for internal use by the MQTT client and server.  <a href="structMQTTAsync__message.html#a2c8572ec595842768848982321835bfe">More...</a><br /></td></tr>
<tr class="separator:a2c8572ec595842768848982321835bfe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a48ff43122b16a12b6b8a9890ebfb6410"><td class="memItemLeft" align="right" valign="top"><a id="a48ff43122b16a12b6b8a9890ebfb6410"></a>
<a class="el" href="structMQTTProperties.html">MQTTProperties</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structMQTTAsync__message.html#a48ff43122b16a12b6b8a9890ebfb6410">properties</a></td></tr>
<tr class="memdesc:a48ff43122b16a12b6b8a9890ebfb6410"><td class="mdescLeft">&#160;</td><td class="mdescRight">The MQTT V5 properties associated with the message. <br /></td></tr>
<tr class="separator:a48ff43122b16a12b6b8a9890ebfb6410"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A structure representing the payload and attributes of an MQTT message. </p>
<p>The message topic is not part of this structure (see MQTTAsync_publishMessage(), MQTTAsync_publish(), MQTTAsync_receive(), MQTTAsync_freeMessage() and MQTTAsync_messageArrived()). </p>
</div><h2 class="groupheader">Field Documentation</h2>
<a id="aa9da73253863089ee90033c7f0dd28bf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa9da73253863089ee90033c7f0dd28bf">&#9670;&nbsp;</a></span>dup</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int MQTTAsync_message::dup</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The dup flag indicates whether or not this message is a duplicate. </p>
<p>It is only meaningful when receiving QoS1 messages. When true, the client application should take appropriate action to deal with the duplicate message. This is an output parameter only. </p>

</div>
</div>
<a id="a2c8572ec595842768848982321835bfe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2c8572ec595842768848982321835bfe">&#9670;&nbsp;</a></span>msgid</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int MQTTAsync_message::msgid</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The message identifier is reserved for internal use by the MQTT client and server. </p>
<p>It is an output parameter only - writing to it will serve no purpose. It contains the MQTT message id of an incoming publish message. </p>

</div>
</div>
<a id="a6e0971dbde0f04b6dd3bfab97ad5cdb7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6e0971dbde0f04b6dd3bfab97ad5cdb7">&#9670;&nbsp;</a></span>qos</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int MQTTAsync_message::qos</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The quality of service (QoS) assigned to the message. </p>
<p>There are three levels of QoS: </p><dl>
<dt><b>QoS0</b> </dt>
<dd>Fire and forget - the message may not be delivered </dd>
<dt><b>QoS1</b> </dt>
<dd>At least once - the message will be delivered, but may be delivered more than once in some circumstances. </dd>
<dt><b>QoS2</b> </dt>
<dd>Once and one only - the message will be delivered exactly once. </dd>
</dl>

</div>
</div>
<a id="a680f5368d5a13ff605466ab6a3d881bd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a680f5368d5a13ff605466ab6a3d881bd">&#9670;&nbsp;</a></span>retained</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int MQTTAsync_message::retained</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The retained flag serves two purposes depending on whether the message it is associated with is being published or received. </p>
<p><b>retained = true</b><br  />
 For messages being published, a true setting indicates that the MQTT server should retain a copy of the message. The message will then be transmitted to new subscribers to a topic that matches the message topic. For subscribers registering a new subscription, the flag being true indicates that the received message is not a new one, but one that has been retained by the MQTT server.</p>
<p><b>retained = false</b> <br  />
 For publishers, this indicates that this message should not be retained by the MQTT server. For subscribers, a false setting indicates this is a normal message, received as a result of it being published to the server. </p>

</div>
</div>
<a id="a4621b522c9923c68003d30e9dba9aa4e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4621b522c9923c68003d30e9dba9aa4e">&#9670;&nbsp;</a></span>struct_id</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char MQTTAsync_message::struct_id[4]</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The eyecatcher for this structure. </p>
<p>must be MQTM. </p>

</div>
</div>
<a id="af79efdfc9a4e082cbbafaed8fd333ce1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af79efdfc9a4e082cbbafaed8fd333ce1">&#9670;&nbsp;</a></span>struct_version</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int MQTTAsync_message::struct_version</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The version number of this structure. </p>
<p>Must be 0 or 1. 0 indicates no message properties </p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>MQTTAsync.h</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon May 24 2021 18:05:54 for MQTT C Client Libraries Internals by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
